<div class="table-margin" [style.height.px]="height">
  <div class="table-header {{ tableHeaderClass }}">
    <table class="table table-bordered table-header">
      <thead>
        <ng-container *ngTemplateOutlet="thead?thead:defThead"></ng-container>
      </thead>
    </table>
  </div>
  <div class="table-body">
    <table class="table table-bordered table-header">
      <tbody>
        <ng-template ngFor let-item [ngForOf]="_data" let-index="index">
          <ng-container *ngTemplateOutlet="tmpl?tmpl:defTmpl;context: {$implicit:item,index:index}"></ng-container>
        </ng-template>
      </tbody>
    </table>
  </div>
</div>
<!-- <hr> -->




<ng-template #defTmpl>
  <p>{{i + 1}}. {{person.name}} : {{person.age}} </p>
  <!-- <input type="checkbox" (click)="selectThis()" [(ngModel)]="tr?.checked" /> -->
</ng-template>
<ng-template #defThead>
  <tr>
    <td>
      <input type="checkbox" [checked]="isSelectAll()" (click)="selectAll()" />
    </td>
    <td>id</td>
    <td>name</td>
    <td>age</td>
  </tr>
</ng-template>
